{% extends "base_generic.html" %}
{% block content %}
        <h1><a href="/blogs">Blogs</a></h1>
        <h2><a href="/admin/blogs//new/" class="add">Añadir blog</a></h2>
        <table class="imgswithoutborders">
        {% for blog in blogs %}
          <tr>
            <td>{{ blog.name }}</td>
            <td>{% if blog.description|truncatewords:18 %}{% else %}Sin desc.{% endif %}</td>  
            <td><a href="/blog/{{ blog.slug }}">Public</a></td>
            <td><a href="/admin/blogs/{{ blog.key }}/edit/">Editar</a></td>
            <td><a href="/admin/blogs/{{ blog.key }}/delete/" onclick="if(confirm('¿Do you really want to delete {{ blog.title }}?')){return true;}else{return false;}">Borrar</a></td>
          </tr>
        {% endfor %}
        </table>

{% endblock %}
